import yaml

from autoTest_BRTC_API.utils.get_path import get_yaml_path

def read_yaml(filename):
    file_path = get_yaml_path(filename)
    with open(file_path,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)

if __name__ == "__main__":
    # print(read_yaml("userManage.yaml"))
    # print(read_yaml("userManage.yaml").get("reg_infors"))
    # print(read_yaml("userManage.yaml").get("login_infors"))
    print(read_yaml("common.yaml"))
    print(read_yaml("common.yaml")['root_url'])
    print(read_yaml('temp.yaml'))
    print(read_yaml('temp.yaml')['token'])
    print(read_yaml('temp.yaml')['userId'])
